package com.itheima.web.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2020-08-14 19:50
 * @description
 */
@WebFilter("/*")
public class AFilter implements Filter {
    public void destroy() {
    }

    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        //这是放行
        System.out.println("我是a----filter 之前");
        chain.doFilter(req, resp);
        System.out.println("我是a----filter 之后");

    }

    public void init(FilterConfig config) throws ServletException {

    }

}
